package com.zp.common.valid;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.ElementType.TYPE_USE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * @author zhangpeng
 * @create 2020/11/2 20:14
 */
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = {ListValsConstraintValidator.class })  //关联
public @interface ListVals {
    String message() default "{com.zp.common.valid.ListVals.message}";

	Class<?>[] groups() default { };

	Class<? extends Payload>[] payload() default { };

	int[] vals() default { };
}
